<template>
    <div>
        <h2>改进和建议</h2><br>
        <el-input
          style="width: 600px"
          type="textarea"
          :autosize="{ minRows: 2, maxRows: 4}"
          placeholder="请输入内容"
          v-model="say.saying">
        </el-input>



        



        <el-form>
            <el-form-item>
            <el-button type="primary" @click="onSubmit">确定提交</el-button>
            <el-button  @click="del">清空</el-button>
            </el-form-item> 



            
        <!-- 课程简介-->
        <!-- <el-form-item label="课程简介">
            <tinymce :height="300" v-model="say.saying1"/>
        </el-form-item> --> 

            
        </el-form>

        
        
        


    </div>
    
   
</template>





  <script>
    import Tinymce from '@/components/Tinymce' //引入组件
    import say from '@/api/say'
    export default {
       components: { Tinymce },
       data() {
         return {
             say:{
                saying:"",
                saying1:''
                
          }

        
         }
       },

      created(){

      },


      methods: {
        onSubmit() {
          say.addsay(this.say)
              .then(response => {//添加成功
              this.saying=this.say.saying      
          //提示信息
          this.$message({
              type: 'success',
              message: '添加成功!'
          });
          console.log(this.say.saying)
         
          
          //回到列表页面 路由跳转
          // this.$router.push({path:'/teacher/table'})
            })
          },
          del(){
              this.say.saying=""
          }
          
        }
      }
    
  
  </script>